<template>
  <a-drawer
    title="详情"
    :maskClosable="true"
    width="900"
    placement="right"
    :closable="true"
    @close="handleCancel"
    :destroyOnClose="true"
    :visible="visible"
    :footer="null"
    style="height: calc(100% - 55px); overflow: auto; padding-bottom: 53px"
  >
    <a-tabs v-model:activeKey="activeKey" style="background-color: #ffffff">
      <a-tab-pane key="0" tab="合同详情">
        <dev-contract-save
          ref="devContractSaveRef"
          @ok="devContractSaveOk"
          @close="handleCancel"
        ></dev-contract-save>
      </a-tab-pane>
      <a-tab-pane key="1" tab="分包合同"> </a-tab-pane>
      <a-tab-pane key="2" tab="发票"> </a-tab-pane>
      <a-tab-pane key="3" tab="关联设备"> </a-tab-pane>
    </a-tabs>
  </a-drawer>
</template>

<script>
import moment from 'moment'
import { getAction, postAction } from '@/api/manage'
import DevContractSave from './DevContractSave.vue'
export default {
  name: 'DevContractEdit',
  components: { DevContractSave },
  data() {
    return {
      activeKey: '0',
      formInfo: {},
      visible: false,
    }
  },
  computed: {},
  created() {},
  methods: {
    moment,
    editDrawer(record) {
      this.formInfo = record
      this.visible = true
      this.$nextTick(() => {
        record.isDisabled = '0'
        this.$refs.devContractSaveRef.edit(record)
      })
    },

    // 关闭
    handleCancel() {
      this.close()
    },
    close() {
      this.$emit('close')
      this.visible = false
    },
    devContractSaveOk(val) {
      this.handleCancel()
    },
  },
}
</script>
